﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Instruments
{
    public class ELoad_Chroma6314 : ELoad
    {
        new public static string _sType = "Chroma,6314";
        public ELoad_Chroma6314(string szInsID) : base(szInsID)
        {
            //Chroma,6314A,6314A0008986,3.02,11,0
            _szType = _sType;
        }

        public override bool Init()
        {
            return base.Init();
        }

        public override double MeasChannelVolt(string Chan)
        {
            _szCmd = "CHAN " + Chan + ";FETC:VOLT?\n";
            return base.MeasChannelVolt(Chan);
        }

        public override double MeasChannelCurr(string Chan)
        {
            _szCmd = "CHAN " + Chan + ";FETC:CURR?\n";
            return base.MeasChannelCurr(Chan);
        }

        public override double MeasChannelPower(string Chan)
        {
            _szCmd = "CHAN " + Chan + ";FETC:POW?\n";
            return base.MeasChannelPower(Chan);
        }

        public override void SetChannelCurr(string chan, string curr)
        {
            _szCmd = "CHAN " + chan + ";:MODE CCH;CURR:STAT:L1 " + curr + ";:LOAD ON\n";
            //this.Write(_szCmd);
            //_szCmd = "LOAD ON\n";
            this.Write(_szCmd);
            base.SetChannelCurr(chan, curr);
        }

        public override bool QueryState()
        {
            return base.QueryState();
        }
    }
}
